package Controller

import (
	"github.com/gin-gonic/gin"
	"repair/Database"
	"repair/Table_Struct"
)

func Maintenance_status(c *gin.Context) {
	db := Database.GetDB()
	cid := c.PostForm("cid")
	var repair Table_Struct.Repair_table
	var dis Table_Struct.Distribution
	db.Where("Rid = ?",cid).First(&repair)
	db.Where("Dtable_number = ?",repair.Rnumber).First(&dis)
	c.JSON(200,dis.Dstatus)
}
